package com.mryang.hds.mapper;

import com.mryang.hds.entity.Need;
import com.mryang.hds.entity.PunchInfo;
import com.mryang.hds.entity.PunchRecord;
import com.mryang.hds.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author Genius
 * @version 1.0.0
 * @ClassName ManageMapper.java
 * @Description TODO
 * @createTime 2023年01月26日 12:56:00
 */
@Mapper
public interface ManageMapper {

    List<User> getUser(@Param("token") User token );

    List<User> searchUser(@Param("uName") String name,
                          @Param("gender") Integer gender,
                          @Param("age") Integer age,
                          @Param("address") String address,
                          @Param("token") User token );

    List<User> getDocterUser();

    List<User> searchDocterUser(@Param("uName") String name,
                                @Param("gender") Integer gender,
                                @Param("age") Integer age,
                                @Param("address") String address);

    List<User> searchPunchUser(@Param("uName") String name,
                               @Param("status") Integer status,
                               @Param("punchInfo") Integer punchInfo,
                               @Param("address") String address,
                               @Param("token") User token );

    List<User> getUserNoPunch(@Param("token") User token);

    void delById(@Param("userId") Integer userId);

    void delPCCById(@Param("userId") Integer userId,@Param("time") String time);

    User getUserById(@Param("userId") Integer userId);

    List<PunchRecord> searchPunchPast(@Param("punchRecord") PunchRecord punchRecord,@Param("token")User token);

    List<PunchRecord> getPunchPastById(@Param("userId") Integer userId);

    List<PunchRecord> getPunchTable(@Param("token")User token);

    List<PunchInfo> getPunchInfoByIdAndTime(@Param("userId") Integer userId,@Param("punchTime")  String punchTime);

    List<Need> needAuditingManage(@Param("needState") Integer needState);

    List<Need> needAuditing(@Param("needState") Integer needState, @Param("userId") Integer userId);

    List<Need> needAuditingManage1(@Param("needState") Integer needState);

    List<Need> needAuditing1(@Param("needState") Integer needState, @Param("userId") Integer userId);

    void needAuditingById(@Param("needId") Integer needId,
                          @Param("needState") Integer needState,
                          @Param("needRemark") String needRemark,
                          @Param("processTime") String processTime);


}
